<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>商品信息编辑</title>
<#include "/WEB-INF/content/module-edit.html">
<script type="text/javascript">
var sysStatus = [
    {"id":"0","text":"正常"},
    {"id":"1","text":"禁用"}
];

var typeTree=[
          	<#list map.typeTree as item>
          		{"id":"${item.id}","text":"${item.text}"}<#if item_has_next>,</#if>
          	</#list>
          ];
$(function() {
  	$("#status").combobox({
  		valueField : 'id',
  		textField : 'text',
  		editable:false,
  		data:sysStatus
  	});
  	$("#cstid").combobox({
  		valueField : 'id',
  		textField : 'text',
  		editable:false,
  		required:true,
  		data:typeTree  		
  	});
 });
</script>
<style>
.input-width{
	width: 95%;
}
</style>
 
</head>
<body class="easyui-layout">
	<div region="north" id="toolbar" style="background-color: #eee; padding: 5px; overflow: hidden;" border="false">
		<#if object.csid?exists&&object.csid!="">
			<@auth code="service:service:update">
				<a href="javascript:void(0);" class="easyui-linkbutton" plain="true" iconCls="icon-add" style="border: 1px solid #ccc" onclick="javascript:save()">保存</a>
			</@auth>
		<#else>
			<@auth code="service:service:create">
				<a href="javascript:void(0);" class="easyui-linkbutton" plain="true" iconCls="icon-add" style="border: 1px solid #ccc" onclick="javascript:save()">保存</a>
			</@auth>
		</#if>
		<a href="javascript:void(0);" class="easyui-linkbutton" plain="true" iconCls="icon-edit" style="border: 1px solid #ccc" onclick="javascript:cancel()">关闭</a>
	</div>
	<div region="center">
		<div id="p" class="easyui-panel" style="background: #fafafa; padding: 10px" fit="true" toolbar="#toolbar">
			<form id="form" method="post">
				<input type="hidden" id="_id" name="csid" value="${object.csid!}"/>
				<table class="form" cellspacing="0" style="width: 100%">
					<tbody style="border: 1px solid #ccc">
						<tr>
							<td class="label">客服名称</td>
							<td><input id="cusname" name="cusname" value="${object.cusname!}" class="easyui-validatebox" required="true"/></td>
							<td class="validate">*</td>		
							<td class="label">客服类型</td>
							<td><input id="cstid" name="cstid" value="${object.cstid!}"/></td>
							<td class="validate">*</td>												
						</tr>
						<tr>
							<td class="label">电话号码</td>
							<td><input id="cusphone" name="cusphone" value="${object.cusphone!}" class="easyui-validatebox" required="true"/></td>
							<td class="validate">*</td>
							<td class="label">状态</td>			
							<td><input id="status" name="status" value="${object.status!0}"/></td>
							<td class="validate"></td>							
						</tr>										
					</tbody>
				</table>
			</form>
		</div>
	</div>
</body>
</html>